package com.blogs.web.game.main;

import com.blogs.web.game.Game;
import com.blogs.web.game.factory.AbstractFactory;
import com.blogs.web.game.factory.typefactory.AlienFactory;
import com.blogs.web.game.factory.typefactory.HumanFactory;

/**
 * @Author: xiaokai
 * @Description: 游戏客户端准备测试
 * @Date: 2019/8/18
 * @Version: 1.0
 */
public class Client {
    public static void main(String[] args) {
        System.out.println("Game Start.................................");
        System.out.println("双方挖矿攒钱。。。");

        //第一位玩家选择了地球人族
        System.out.println("工人建造人族工厂。。。");
        AbstractFactory factory = new HumanFactory(10, 10);

        Game marine = factory.createLowClass();
        marine.show();

        Game tank = factory.createMidClass();
        tank.show();

        Game ship = factory.createHighClass();
        ship.show();

        //另一位玩家选择了外星族
        System.out.println("工蜂建造外星虫族工厂。。。");
        factory = new AlienFactory(200, 200);

        Game roach = factory.createLowClass();
        roach.show();

        Game spitter = factory.createMidClass();
        spitter.show();

        Game mammoth = factory.createHighClass();
        mammoth.show();

        System.out.println("两族开始大混战。。。");
        marine.attack();
        roach.attack();
        spitter.attack();
        tank.attack();
        mammoth.attack();
        ship.attack();
        System.out.println("Game Over.................................");
    }
}
